package cn.xn.hrms.infrastructure.dao;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.xn.hrms.api.dto.res.LeaveDTO;

public interface LeaveDao {

    int insertSelective(LeaveDTO record);

    LeaveDTO selectByPrimaryKey(Long id);

    int updateByPrimaryKey(LeaveDTO record);

    List<LeaveDTO> findAllByParams(@Param("status") Integer status, @Param("type") Integer type,
                                   @Param("leaver") Integer leaver);

    int updateStatusAndApproverAndApproveTimeById(@Param("updatedStatus") Integer updatedStatus,
                                                  @Param("updatedApprover") Integer updatedApprover, @Param("updatedApproveTime") Date updatedApproveTime, @Param("id") Long id, @Param("remark") String remark);

    int updateStatusAndApproverAndApproveTimeByIdIn(@Param("updatedStatus")Integer updatedStatus,@Param("updatedApprover")Integer updatedApprover,@Param("updatedApproveTime")Date updatedApproveTime,@Param("idCollection")Collection<Long> idCollection);


    List<LeaveDTO> listAll(@Param("status") Integer leaveStatus);
    int updateIsDeletedByIdIn(@Param("updatedIsDeleted")Integer updatedIsDeleted,@Param("idCollection")Collection<Long> idCollection);


}
